import selenium
import selenium.webdriver #模拟浏览器
import re

def getnumberbyname(searchname):
    url="https://m.bilibili.com/video/"+searchname+"?redirectFrom=h5"
    driver=selenium.webdriver.Firefox()
    driver.get(url)
    pagesource=driver.page_source #抓取网页源代码
    print(pagesource)
    # restr="(\\w+)"  
    # regex=re.compile(restr,re.IGNORECASE)
    # mylist=regex.findall(pagesource)
    # driver.close() #关闭

print(getnumberbyname('av75687868'))